<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="../../css/plupload.queue.css" type="text/css" media="screen" />
<title>이미지 첨부</title>
<style type="text/css">
body {background: #45494d;}
</style>
<script src="../../js/plupload/jquery.1.5.2.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="../../js/plupload/gears_init.js"></script>
<script type="text/javascript" src="../../js/plupload/browserplus-min.js"></script>
<script type="text/javascript" src="../../js/plupload/plupload.full.min.js"></script>
<script type="text/javascript" src="../../js/plupload/jquery.plupload.queue.min.js"></script>
<script type="text/javascript">
$(function() {


	$("#uploader").pluploadQueue({
		// General settings
		runtimes: 'flash,gears,browserplus,silverlight,html5,html4',
		url: '/include/fileUpload.daum',
		//max_file_size: '5mb',
		//chunk_size: '1mb',
		unique_names: true,

		// Resize images on clientside if we can
		//resize: {width: 600, height: 4000, quality: 100},

		// Specify what files to browse for
		filters: [
			{title: "Image files", extensions: "jpg,gif,png,jpeg,bmp,tif"}
		],

		// Flash/Silverlight paths
		flash_swf_url: '../../js/plupload/plupload.flash.swf',
		silverlight_xap_url: '../../js/plupload/plupload.silverlight.xap',

		// Post init events, bound after the internal events
		init: {

			FileUploaded: function(up, file, info) {
				// Called when a file has finished uploading
				if($('input[name=imgfname]').val() == ''){
					fname = file.name;
					$('input[name=imgfname]').val(fname);
				}else {
					fname = $('input[name=imgfname]').val() + "," +file.name;
					$('input[name=imgfname]').val(fname);
				}
				if (up.total.uploaded == up.files.length){
					$('form').submit();
				}
			}
		}
	});

});
</script>
</head>
<body>

<form  method="post" action="/include/fileinfo.daum">
	<input type="hidden" name="imgfname" value="" />
	<div id="uploader">&nbsp;</div>
</form>

</body>
</html>